T
CSharpTest.Net
OrderedEnumeration<T> Class
Members  Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace : OrderedEnumeration<T> Class

Glossary Item Box

Creates an ordered enumeration from an unordered enumeration by paginating the data, sorting the page, and then performing a binary-tree grouped mergesort on the resulting pages. When the page size (memoryLimit) is hit, the page will be unloaded to disk and restored on demand if a serializer is provided.

Syntax

Visual Basic (Declaration) 
Public Class OrderedEnumeration(Of T) 
C# 
public class OrderedEnumeration<T> 

Type Parameters

T

Example

Library/Library.Test/TestOrderedEnumeration.cs

C#Copy Code
var order = new OrderedEnumeration<byte>(new byte[1]);
System.Collections.IEnumerator e = ((System.Collections.IEnumerable)order).GetEnumerator();
Assert.IsTrue(e.MoveNext());
Assert.IsFalse(e.MoveNext());
try
{
    object val = e.Current;
    GC.KeepAlive(val);
    Assert.Fail();
}
catch (InvalidOperationException) { }

try
{
    e.Reset();
    Assert.Fail();
}
catch (NotSupportedException) { }
VB.NETCopy Code
Dim order As var = New OrderedEnumeration(Of Byte)(New Byte(1) {})
Dim e As System.Collections.IEnumerator = (DirectCast(order, System.Collections.IEnumerable)).GetEnumerator()
Assert.IsTrue(e.MoveNext())
Assert.IsFalse(e.MoveNext())
Try
    Dim val As Object = e.Current
    GC.KeepAlive(val)
    Assert.Fail()
Catch generatedExceptionName As InvalidOperationException
End Try

Try
    e.Reset()
    Assert.Fail()
Catch generatedExceptionName As NotSupportedException
End Try

Inheritance Hierarchy

System.Object
   CSharpTest.Net.Collections.OrderedEnumeration<T>
      CSharpTest.Net.Collections.OrderedKeyValuePairs<TKey,TValue>

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys